268

|

6 Applications and Methods in Biosignal Processing

Listing 6.3.2: Matlab example for the analysis of a phonocardiogram in relation to the LVET.

%% reads the phonocardiogram x(t) from wav file,

%% it is rectified x1 = abs(x),

%% it is gated with a moving-average filter,

%% from which the auto-correlation is calculated and displayed.

%% Subsequently, the LVET is calculated and output.

% Read signal and plot

[x,Fs] = audioread('pkg.wav');

Ns = 1:length(x);

% signal length

ts = Ns/Fs;

% sample time

x = x(1:160000);

% selection of first 20 sec.

ts = ts(1:160000);

time t / s

time t / s

Fig. 6.39: Phonocardiogram from Figure 6.37 after rectification (top): Phonocardiogram after rectific-

ation and low-pass filtering using moving-average filter (window width: 200 samples) (bottom).